#include <iostream>
#include <vector>
using namespace std;
#define maxn 10
#define maxk 82

int n,k;
vector<int> can;
long long dp[maxn][1<<maxn][maxk];

int getBinarySum(int x)
{
    int ret=0;
    while(x!=0) ret+=(x&1), x>>=1;
    return ret;
}

int main(){
	cin>>n>>k;
	int max_state = (1<<n)-1;
	for(int i=0; i<max_state; i++)
		if(!(i&(i<<1))) can.push_back(i);
	for(int i=0; i<can.size(); i++)
		dp[0][can[i]][getBinarySum(can[i])]=1;

	for(int i=1; i<n; i++){
		for(int c=0; c<can.size(); c++){
			int cstate = can[c];
			for(int p=0; p<can.size(); p++){
				int pstate = can[p];
				if((pstate&cstate)||(pstate&(cstate<<1))||((pstate<<1)&cstate)) continue;
				for(int num=0; num<=k; num++)
					dp[i][cstate][getBinarySum(cstate)+num] += dp[i-1][pstate][num];
			}
		}
	}

	long long ans = 0;
	for(int i=0; i<can.size(); i++){
		ans += dp[n-1][can[i]][k];
	}
	
	cout<<ans<<endl;
	return 0;
}